const App = getApp();
Component({
  properties: {
    imgUrls: {
      type: Array,
      value: []
    }
  },
  data: {
    indicatorDots: false,
    autoplay: false,
    interval: 3000,
    duration: 800,
    current: 0,
    imgheights: ''
  },
  lifetimes: {
    attached: function () {
      this.setData({
        statusBarHeight: App.globalData.navHeight,
      })
      this.setData({
        statusBarPadding: App.globalData.navTop,
      })
    }
  },
  methods: {
    swiperChange: function (t) {
      this.setData({
        current: t.detail.current
      });
    },
    clickBanner: function (t) {
      console.log(this.imgUrls)
    },
    imageLoad: function (e) { //获取图片真实宽度  
      var imgwidth = e.detail.width,
        imgheight = e.detail.height,
        ratio = imgwidth / imgheight;
      var viewHeight = 750 / ratio;
      this.setData({
        imgheights: viewHeight
      })
    },
  }
});